package org.example.controller;

import jakarta.annotation.Resource;
import org.example.pojo.DailyPassengerCount;
import org.example.pojo.MonthPassengerCount;
import org.example.service.impl.PassengerCountService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/PassengerCount")
public class PassengerCountController {

    @Resource
    PassengerCountService passengerCountService;

    @GetMapping("/Daily")
    public List<DailyPassengerCount> getDaily(){
        return passengerCountService.getDaily();
    }

    @GetMapping("/monthly")
    public List<MonthPassengerCount> getMonthly(){
        return passengerCountService.getMonthly();
    }
}
